package com.mysiteforme.admin.util;

import org.joda.time.DateTime;
import org.jsoup.helper.DataUtil;

import java.util.Date;
import java.util.Random;
import java.util.UUID;

public class UUIDUtil {
    public static String getUUID() {
        return UUID.randomUUID().toString().replace("-", "");
    }

    public static String getMaxUUID() {
        String dateTime = new DateTime().toString("yyyyMMddhhmmss");
        String uuid = UUID.randomUUID().toString().replaceAll("-", "").toUpperCase();
        String ranEight = String.format("%08d", new Random().nextInt(99999999));
        return dateTime + uuid + ranEight;
    }
    public static void main(String a[]){
        System.out.println(getMaxUUID().length());
    }
}
